import sys
import numpy as np
import matplotlib.pyplot as plt

row = []
col = []
csc = []

filename = str(sys.argv[1])
print(filename)

with open(filename, 'r') as f:
	line = f.readline()
	data = line.strip().split()
	m = int(data[0])
	n = int(data[1])
	nonz = int(data[2])

	lines = f.readlines()
	for line in lines:
		data = line.strip().split()
		row.append(int(data[0]))
		col.append(int(data[1]))
		# csc.append(float(data[2]))
		

plt.figure(figsize=(8, 8))

plt.scatter(row, col, s=0.1, c='red', marker='.', label=filename)

plt.gca().invert_yaxis()
plt.gca().xaxis.set_ticks_position('top')

plt.savefig(filename + '.png')



	
